package com.example.shoppingmall.service;

import com.example.shoppingmall.dao.ImpExportMapper;
import com.example.shoppingmall.pojo.ImpExport;
import com.example.shoppingmall.pojo.ImpState;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ImpExportService {

    @Autowired
    ImpExportMapper impExportMapper;

    //模糊查询+分页
    public List<ImpExport> expList(String import_name, Integer file_state,
                                   Integer pageNo, Integer pageNum){
        return impExportMapper.expList(import_name, file_state, pageNo, pageNum);
    }

    //查询总条数是
    public int total(String import_name,Integer file_state){
        return impExportMapper.total(import_name, file_state);
    }

    //查询
    public ImpExport getExp(Integer id){
        return impExportMapper.getExp(id);
    }

    //查询
    public List<ImpExport> getExp2(Integer id){
        return impExportMapper.getExp2(id);
    }

    //新增
    public int add(ImpExport impExport){
        return impExportMapper.add(impExport);
    }

    //修改
    public int update(ImpExport impExport){
        return impExportMapper.update(impExport);
    }

    //查询状态List
    public List<ImpState> stateList(){
        return impExportMapper.stateList();
    }

}
